Tutorial 10: The Multimedia System
Move Up Move to Top Move to Top Move to Top
Contents: Multimedia Overview Multimedia Actions
Action Parameters Multimedia Type Recognition
Multimedia Type Matching Summary
Multimedia Overview

Usenet is a text only medium. It is possible to include non-textual information such as pictures, audio, and video by encoding the data in various ways. There are two basic standards for non text information on usenet:

  • uuencoded data blocks - uuencoding is a process for transforming arbitrary binary data to 7-bit ASCII text form for transmitting over text transports such as usenet or email. Uuencoding is very old, predating personal computers, but still useful and quite popular. It suffers from several drawbacks, however. It does not include any information on the type of the encoded data, for example.

  • MIME - MIME stands for Multipurpose Internet Mail Extensions, and is a newer method of encapuslating non-text attachments in text transports. MIME solves many of the problems of uuencoding. For instance, it specifies the type of the data it encloses.

The type of the enclosed data (for example, a jpeg bitmap, or a WAV audio file, or plain text) is called the Multimedia Type. The MIME format defines various multimedia types, which are composed of a type and a subtype separated by a forward slash. Some example multimedia types are:

    image/jpeg
    image/gif
    text/plain
    application/octet-stream
    application/postscript

In the case of MIME messages, NewsRog can obtain the multimedia type from the information MIME itself provides. In the case of uuencode, this is not possible, but NewsRog provides a powerful ability to auto-detect the data type by examining the decoded data itself.

Any multimedia types or subtypes that begin with the X- are internal to NewsRog. An example is "application/X-URL". Other multimedia types or subtypes that do not begin with X- are standardized.

Back to Top

Multimedia Actions User defined actions may be defined for different multimedia types. For example, you might define a Show action that calls one command for image/jpeg and another for application/postscript. Then you might define a Print command that sends application/postscript data to a postscript printer and text/plain data to another printer. Actions can match multimedia types using wildcards, so one might define an action for image/*. Actions can have any user defined name.

The multimedia action editor looks like this:

This editor associates multimedia types with user commands. The following buttons are available:

  • New - Add a new multimedia action.

  • Delete - Delete the selected actions.

  • Clone - Clone the active multimedia action.

  • Save - Save the selected action to a disk file.

  • Insert - Insert a saved action into the current list.

  • Sort - Sort the current list by multimedia type.

Back to Top
Multimedia Action Parameters For each multimedia action, the following data may be defined:

Parameter Description
Media Type This is an AmigaOS pattern matching a multimedia type. For example, you might use image/* to match all image data in order to send it to an external viewer program, text/* to send text data to a text viewer, or video/quicktime to send this type to a quicktime video player.
Action Name This is a user defined name describing the action. All action names found for a particular media type will be listed anyplace in NewsRog where multimedia actions may be performed.
Command This is the command to launch in order to perform the requested action. For example, this command might show a quicktime video or print a postscript file.
Args The arguments (parameters) to the command. In most cases there are variables available such as ${File}, ${URL}, or ${ArtSubj} that can be substituted before invoking the command. The exact details are described elsewhere in this documentation.
Input A filename from which the standard input of the command should be redirected.
Output A filename to which the standard output of the command should be redirected.
Stack The stack size for the command.
Pri The task priority for the command.
Dir The working directory for the command.
ASync If set, the command is run asynchronously (in the background). In this case, NewsRog will continue to run even while the command is executing. Turning this option off will cause the command to be executed synchronously (in the foreground), in which case NewsRog will be suspended until the command returns. Most often, Async is the correct setting.

Back to Top

Multimedia Type Recognition The multimedia type recognition system is used only in cases where the multimedia type is not specified in the file itself (for example, uuencoded data does not specify a multimedia type). In this case, NewsRog will attempt to determine the content type by examining the encoded data itself. The Multimedia Types lists contains a set of rules to be used in order to match data name or content to multimedia types. Not all types need ot be listed here! Many can be determined based on MIME information. Only in other cases such as uuencoded data does NewsRog use this information to determine the media type. The Multimedia Types list looks like this:

The first field is the multimedia type. The second is the method used to match the data to the type, and the third is pattern used to do the matching. The exact interpretation of the pattern field depends on the method used to do the matching.

The following commands are available:

  • New - Add a new (empty) multimedia type.

  • Delete - Delete the selected multimedia types.

  • Clone - Create a copy of the selected multimedia type.

  • Save... - Save the selected type to disk.

  • Insert... - Insert a saved media type into the list.

  • Sort - Sort the media types by name.

Back to Top
Multimedia Type Matching There are several types of matching available:

Method Description
Match File Name (Ignore Case) A straightforward match of a filename, ignoring case. Any valid AmigaOS pattern may be used. It is generally better to match the data contents, if possible. Most formats have fixed identifier bytes near the beginning of the data to permit a content match.
Match File Name (Match Case) Similar to the above, but case sensitive.
Match Data Contents (Binary) The Pattern attribute is a description of a short segment of the data's contents, in ASCII or hex. The following may be included, and must be separated by one or more spaces:

  • The keyword Offset (case sensitive), followed by a colon, followed by an offset specifying a byte position in the data. For example:

      Offset:6

  • The string 0x, followed by one or more hex characters. For example:

      0x00ab91

  • One or more more 8 bit printable characters.
The hex or printable characters must match the data contents at the indicated offset. For example, to match a JPEG file, one might use:

    Offset:6 JFIF

Which will match any data with the string JFIF 6 bytes into the file.

Match Data Contents (Pattern) The data is checked for the given AmigaOS pattern. Note that this will happen for binary and text data alike. The results for binary data may be unpredictable, and this is only designed for use on textual data.
Match Directory Name (Ignore Case) Not applicable to inline data in posts.
Match Directory Name (Match Case) Not applicable to inline data in posts.

Back to Top

Summary By this point in the tutorial you should understand:

  • The two primary standards for including non-texual data in usenet posts.
  • What a multimedia type is.
  • The difference between internal and standardized multimedia types and subtypes.
  • How multimedia actions are matched against multimedia types.
  • How to add, delete, and manage multimedia actions.
  • The different options that may be set for multimedia actions.
  • How multimedia types are recognized for imbedded data which does not specify the type itself.
  • The different supported types of data matching.
Back to Top